package com.wenboit.initproject.service.impl;

import com.wenboit.initproject.pojo.entity.User;
import com.wenboit.initproject.repository.UserRepository;
import com.wenboit.initproject.service.UserService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (UserServiceImpl). 
 *
 * @author 汪文波(Wang Wenbo) wenboit@163.com
 * @notes Create on 2021-12-12 20:50
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserRepository userRepository;

    @Override
    public List<User> findAll() {
        return userRepository.findAll();
    }

    @Override
    public Page<User> findAll(PageRequest request) {
        return userRepository.findAll(request);
    }
}
